Skip to content

fix(rust): require arrow >= 59 so FFI imports realign buffers - #5000

Merged
lidavidm merged 2 commits into
apache:mainfrom
felipecrv:automatic-buffer-realignment
Nov 11, 2026
Merged

lidavidm merged 2 commits into
apache:mainfrom
felipecrv:automatic-buffer-realignment

Conversation

@felipecrv

Copy link
Copy Markdown
Contributor

Drivers may export buffers that only meet the C Data Interface's recommended 8-byte alignment (and sometimes not even that), but arrow-rs requires 16-byte alignment for i128 (e.g. Decimal128). With arrow 58, importing such data through from_ffi or ArrowArrayStreamReader panics.

arrow 59 realigns under-aligned buffers on import (apache/arrow-rs#10030), so raise the minimum arrow version to 59 and add a regression test that imports an 8-byte-aligned Decimal128 buffer.

Closes #2526.

Drivers may export buffers that only meet the C Data Interface's
recommended 8-byte alignment, but arrow-rs requires 16-byte alignment
for i128 (e.g. Decimal128). With arrow 58, importing such data through
`from_ffi` or `ArrowArrayStreamReader` panics.

arrow 59 realigns under-aligned buffers on import (apache/arrow-rs#10030),
so raise the minimum arrow version to 59 and add a regression test that
imports an 8-byte-aligned Decimal128 buffer.

Closes apache#2526.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@felipecrv

Copy link
Copy Markdown
Contributor Author

I have no rush in merging this because it bumps the minimum Arrow requirement. It's really just a test and documentation of this problem we had in arrow-rs.

cc @lidavidm @zeroshade

@lidavidm

lidavidm commented Nov 8, 2026

Copy link
Copy Markdown
Member

I think I held back for a bit because of DataFusion. That said, 58.x still seems to get patch releases (it was included in the round of updates two weeks ago). Based on apache/arrow-rs#10349 it seems to be because Comet is still on 58.x.

@lidavidm

lidavidm commented Nov 8, 2026

Copy link
Copy Markdown
Member

Hmm, but they've since upgraded (apache/datafusion-comet@75fdddc). I think we may as well go ahead.

Comment thread rust/Cargo.toml Resolved
@lidavidm
lidavidm merged commit 002ce53 into apache:main Nov 11, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rust: ADBC driver panics when consuming Arrow batches without properly aligned buffers

2 participants